import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Register from "../views/Register.vue";
import Main from "@/components/Main";
import Empty from "@/components/Empty";
import Introduction from "@/views/Introduction";
import Teacher from "@/views/Teacher";
import Face from "@/views/Face";
import error from "@/components/404"

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/main',
    children: [
      {
        path: '/main',
        name: 'Main',
        component: Main
      },
      {
        path: '/empty',
        name: 'Empty',
        component: Empty
      },
      {
        path: '/introduction',
        name: 'Introduction',
        component: Introduction
      },
      {
        path: '/teacher',
        name: 'Teacher',
        component: Teacher
      },
    ]
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/face',
    name: '/Face',
    component: Face
  },
  {
    path: '/404',
    name: '404',
    component: error
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
